feat: add llama-index-tools-commune for email and SMS#20855
Open
shanjairaj7 wants to merge 6 commits intorun-llama:mainfrom
Open
feat: add llama-index-tools-commune for email and SMS#20855shanjairaj7 wants to merge 6 commits intorun-llama:mainfrom
shanjairaj7 wants to merge 6 commits intorun-llama:mainfrom
Conversation
AstraBert
reviewed
Mar 3, 2026
Member
AstraBert
left a comment
There was a problem hiding this comment.
The core looks good, but tests are needed before merging
Comment on lines
+58
to
+64
| try: | ||
| from commune import Commune # type: ignore[import] | ||
| except ImportError as exc: | ||
| raise ImportError( | ||
| "commune-mail is required. Install it with: " | ||
| "pip install commune-mail" | ||
| ) from exc |
Member
There was a problem hiding this comment.
This is a required dependency, no need for lazy importing + error checking, you can import at the top
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new tool integration:
llama-index-tools-commune, which gives LlamaIndex agents a real email inbox and SMS capability via Commune.What is Commune?
Commune is email and SMS infrastructure built specifically for AI agents. It provides:
commune-mailon PyPI)This is useful for agentic workflows where the agent needs to communicate with humans or other systems through standard channels — customer support triage, automated notifications, multi-agent coordination, and so on.
Real use case: customer support email routing
The agent will call
load_inbox(unread_only=True), read each email withget_email, then callsend_emailto route each one — all without any custom tool wiring.Spec functions
load_inboxlimitandunread_onlyfiltersearch_emailsget_emailsend_emailsend_smsget_creditsPackage details
pip install llama-index-tools-commune(will be published on merge)commune-mailon PyPIllama-index-core>=0.11.0,commune-mail>=0.2.0Files added
Checklist
BaseToolSpec)pyproject.tomlincludes[tool.llamahub]metadata